Skip to content

Add configurable streaming mode for LLM providers that do not support tool use in streaming mode#256

Open
susesamu wants to merge 3 commits into
rancher:mainfrom
susesamu:255-streaming
Open

Add configurable streaming mode for LLM providers that do not support tool use in streaming mode#256
susesamu wants to merge 3 commits into
rancher:mainfrom
susesamu:255-streaming

Conversation

@susesamu

Copy link
Copy Markdown

issue: #255

susesamu added 2 commits June 18, 2026 14:56
Signed-off-by: Samuel Vasconcelos <samuel.vasconcelos@suse.com>
Signed-off-by: Samuel Vasconcelos <samuel.vasconcelos@suse.com>
@raulcabello

raulcabello commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution @susesamu ! This PR is disabling streaming for all LLM calls. You only need to disable streaming for tool_calls, right?
I haven't tested it, but Langchain already provides a way of doing that. Can you try setting disable_streaming to tool_calling when creating the LLM? see https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/language_models/chat_models.py#L332

we create the LLM in https://github.com/rancher/rancher-ai-agent/blob/main/app/services/llm.py#L59. It'd need to be added to all providers (ChatOllama, ChatOpenAI, ... )

@susesamu

Copy link
Copy Markdown
Author

thanks @raulcabello. That's right, good point. I just updated to disable only tool_calling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants